<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="/view/common/header.jsp"%> 
<script type="text/javascript" src="${ctx}/resources/js/userManage.js"></script>
</head>


<body style="margin:1px;">
	<!-- 工具栏  -->
	<div id="tb">
	<form id="searchfm" >
		<div>
			<a href="javascript:openAddDialog()" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a>
			<a href="javascript:openModifyDialog()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
			<a href="javascript:disableUsers()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
		</div>
		
		<div>
			&nbsp;登录名：&nbsp;<input type="text" id="username"  size="20" />&nbsp;
			&nbsp;姓名：&nbsp;<input type="text" id="realName" size="20"  /> &nbsp;
			<a href="javascript:commonSearch()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
		    <a href="javascript:resetSearchForm()" class="easyui-linkbutton" iconCls="icon-arrow_undo" plain="true">重置</a>
		</div>
	 </form>	
	</div>
	 
	<!-- 查询表单 --> 
	<table id="dg" title="用户管理" class="easyui-datagrid"  pagination="true" rownumbers="true"  fit="true"  url="${ctx}/user/querySysUser.do"  toolbar="#tb">
		 <thead>
				<tr>
					<th field="cb" checkbox="true" align="center"></th>
			 		<th field="userid" width="50" align="center" hidden="true">用户id</th>
			 		<th field="role_ids" width="500" hidden="true" align="center">角色id</th>
			 		<th field="username" width="150" align="center">登录用户名</th>
			 		<th field="realName" width="200" align="center">真实姓名</th>
			 		<th field="phoneNumber" width="200" align="center">联系电话</th>
			 		<th field="role_names" width="500" align="center">角色</th>
<!-- 			 		<th field="status" width="200" align="center" data-options="formatter:statusFormatter">状态</th> -->
				</tr>
		</thead>
	</table>
	
	
	<!-- 弹出对话框 -->
	<div id="dlg" class="easyui-dialog" style="width: 700px;height:320px;padding: 10px 20px" closed="true" buttons="#dlg-buttons">
		<form id="fm" method="post" novalidate>
		
		 <div class="ftitle">用户信息</div>
         	<input name="userid" type="hidden" />
         	<input id="role_ids"  name="role_ids" type="hidden" />
         	<input name="status" type="hidden" />
         	
            <div class="fitem">
                <label>登录用户名:</label>
                <input id="username" name="username" class="easyui-textbox easyui-validatebox"   data-options="required:true">
            </div>
            <div class="fitem">
                <label>真实姓名:</label>
                <input name="realName" class="easyui-textbox" required="true">
            </div>
             <div class="fitem">
                <label>联系电话:</label>
                <input name="phoneNumber" class="easyui-textbox easyui-validatebox" required="true" data-options="validType:['mobile']">
            </div>
        <div class="ftitle">角色信息</div>
        
        <div id="rolePanel" class="hbox">
         
        </div>
      </form>
	</div>

	<!-- 保存和关闭按钮 -->
	<div id="dlg-buttons">
		<a href="javascript:saveUser()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
		<a href="javascript:closeDialog()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
	</div>
</body>
</html>